package com.caigou.modules.query.repository

import com.caigou.comm.base.bean.HttpResult
import com.caigou.comm.base.bean.PrizeBallBean
import com.caigou.modules.query.bean.*
import com.caigou.modules.query.network.HttpQueryService
import dagger.hilt.android.scopes.ActivityRetainedScoped
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

/**
 * @author #Suyghur.
 * Created on 2021/09/26
 */
@ActivityRetainedScoped
class QueryRepository @Inject constructor() {

    fun getPrizeBallList(): Flow<HttpResult<MutableList<PrizeBallBean>>> {
        return HttpQueryService.service.getPrizeBallList()
    }

    fun getShengXiaoBallList(): Flow<HttpResult<MutableList<ShengXiaoBallItemBean>>> {
        return HttpQueryService.service.getShengXiaoBallList()
    }

    fun getBoSeBallList(): Flow<HttpResult<BoSeBallBean>> {
        return HttpQueryService.service.getBoSeBallList()
    }


    fun getLingMaImg(): Flow<HttpResult<String>> {
        return HttpQueryService.service.getLingMaImg()
    }

    fun getColdHotList(sort: Int, count: Int): Flow<HttpResult<MutableList<ColdHotItemBean>>> {
        return HttpQueryService.service.getColdHotList(sort, count)
    }

    fun getColdHotDetailList(count: Int): Flow<HttpResult<MutableList<ColdHotDetailItemBean>>> {
        return HttpQueryService.service.getColdHotDetailList(count)
    }

    fun getLongestCodeList(tabType: Int): Flow<HttpResult<MutableList<LongestCodeItemBean>>> {
        return HttpQueryService.service.getLongestCodeList(tabType)
    }

    fun getPrizeDate(): Flow<HttpResult<MutableList<OpenPrizeTimeBean>>> {
        return HttpQueryService.service.getPrizeDate()
    }

}